package com.zlzxm.shoesmarket.viewmodel;

import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;

import com.zlzxm.shoesmarket.TestConstant;
import com.zlzxm.shoesmarket.net.BaseCallBack;
import com.zlzxm.shoesmarket.net.api.InvApi;
import com.zlzxm.shoesmarket.net.repository.InvRepository;
import com.zlzxm.shoesmarket.net.respone.BaseResponse;
import com.zlzxm.shoesmarket.util.RxAndroidHelp;
import com.zlzxm.shoesmarket.view.adapter.entity.EntitySizeInfo;
import com.zlzxm.shoesmarket.viewmodel.entity.EntityGoodsDetail;

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;

import io.reactivex.rxjava3.annotations.NonNull;
import io.reactivex.rxjava3.core.Observable;
import io.reactivex.rxjava3.core.Observer;
import io.reactivex.rxjava3.disposables.Disposable;
import io.reactivex.rxjava3.functions.Consumer;

/**
 * CREATE BY zlzxm ON 4/15/21
 */
public class VMRepositoryGoodsDetail extends BaseViewModel {

    private InvRepository invRepository = new InvRepository();

    public MutableLiveData<EntityGoodsDetail> liveGoodsInfo = new MutableLiveData<>();
    
    public void requestSize(String id){


//        invRepository.list(id,"7",null)
//                .compose(RxAndroidHelp.turn())
//                .subscribe(new Consumer<BaseResponse<String>>() {
//                    @Override
//                    public void accept(BaseResponse<String> stringBaseCallBack) throws Throwable {
//
//                    }
//                },throwableCallback);




    }


//<editor-fold defaultState="collapsed" desc="测试数据">

    private EntityGoodsDetail createTest(){


        EntityGoodsDetail entityGoodsDetail = new EntityGoodsDetail();

        entityGoodsDetail.setName("球鞋名称");
        entityGoodsDetail.setCode("货号：xxxxxxx-xx");
        entityGoodsDetail.setBrand("品牌：xxxxxxx-xx");
        entityGoodsDetail.setNum("12");
        entityGoodsDetail.setCost("1241");
        entityGoodsDetail.setProfit("1241");
        entityGoodsDetail.setRealProfit("1241");
        entityGoodsDetail.setProfitRate("20%");
        entityGoodsDetail.setSizeInfos("121,121,121");
        entityGoodsDetail.setFace(TestConstant.PIC_SIX);


        return  entityGoodsDetail;

    }



// </editor-fold>
}
